/** Created by CUIJA on 05-19-2017.*/

var angular = require('angular');

var coreRoutes = require('./routes/core.routes');

var navMenuService = require('./services/menu.service');
var foodsService = require('./services/foods.service');
var ordersService = require('./services/orders.service'); 
var foodAdService = require('./services/foodAd.service');


var navbarController = require('./components/nav/nav.controller');
var navbarComponent = require('./components/nav/nav');
var foodsController = require('./foods/foods.controller');
var addFoodController = require('./foods/addFood.controller');
var upFoodController = require('./foods/upFood.controller');
var ordersController = require('./orders/orders.controller');
var unreceivedOrdersController = require('./orders/unreceivedOrders.controller');
var receivedOrdersController = require('./orders/receivedOrders.controller');
var refusedOrdersController = require('./orders/refusedOrders.controller');
var deliveringOrdersController = require('./orders/deliveringOrders.controller');
var finishedOrdersController = require('./orders/finishedOrders.controller');
var foodAdController = require('./foodAd/foodAd.controller');

const moduleName = 'core';

angular.module(moduleName, [])
  .config(coreRoutes)
  .factory('navMenuService', navMenuService)
  .factory('foodsService', foodsService)
  .factory('ordersService', ordersService)
  .factory('foodAdService',foodAdService)


  .component('navbar', navbarComponent)
  .controller('navbarController', navbarController)
  .controller('foodsController', foodsController)
  .controller('addFoodController', addFoodController)
  .controller('ordersController', ordersController)
  .controller('upFoodController', upFoodController)
  .controller('unreceivedOrdersController', unreceivedOrdersController)
  .controller('receivedOrdersController', receivedOrdersController)
  .controller('refusedOrdersController', refusedOrdersController)
  .controller('deliveringOrdersController', deliveringOrdersController)
  .controller('finishedOrdersController', finishedOrdersController)
  .controller('foodAdController',foodAdController)
;

module.exports = moduleName;